<?php

if(empty($cat)){$cat = 'manage';}
if(empty($right_side)){$right_side = '';}
if(empty($left_side)){$left_side = '';}
if(empty($ad1_enable_yes)){$ad1_enable_yes = '';}
if(empty($ad1_enable_no)){$ad1_enable_no = '';}
if(empty($ad2_enable_yes)){$ad2_enable_yes = '';}
if(empty($ad2_enable_no)){$ad2_enable_no = '';}
if(empty($ad3_enable_yes)){$ad3_enable_yes = '';}
if(empty($ad3_enable_no)){$ad3_enable_no = '';}
if(empty($ad4_enable_yes)){$ad4_enable_yes = '';}
if(empty($ad4_enable_no)){$ad4_enable_no = '';}
if(empty($ad5_enable_yes)){$ad5_enable_yes = '';}
if(empty($ad5_enable_no)){$ad5_enable_no = '';}
if(empty($content)){$content = '';}

$right_side = $right_side . quick_info('Quick Summary','
users count: '.get_users_count().'
<br>subtitles count: '.get_subtitles_count().'
<br>videos count: '.get_videos_count().'
');

$right_side = $right_side . "<br>" . quick_links('Quick Links','
<a href="http://sourceforge.net/projects/onlinesubtitles/forums/forum/1758498" target="_blank">Open Discussion</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<a href="http://sourceforge.net/tracker/?group_id=534975&atid=2172715" target="_blank">Bugs</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<a href="http://sourceforge.net/projects/onlinesubtitles/forums/forum/1758499" target="_blank">Help Forum</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<a href="http://sourceforge.net/tracker/?group_id=534975&atid=2172718" target="_blank">Feature Requests</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<a href="http://sourceforge.net/projects/onlinesubtitles/forums/forum/1761558" target="_blank">Security Forum</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br>
<a href="http://sourceforge.net/tracker/?group_id=534975&atid=2172716" target="_blank">Support Requests</a>
');

$options_list[0][0] = 'manage ads';
$options_list[0][1] = 'index.php?page=ads&cat=manage';


$left_side = $left_side . left_list('ads manager',$options_list);


if(read_option('ad1_enable', 'enable')=="1") {$ad1_enable_yes='selected="selected"';} else {$ad1_enable_no='selected="selected"';}
if(read_option('ad2_enable', 'enable')=="1") {$ad2_enable_yes='selected="selected"';} else {$ad2_enable_no='selected="selected"';}
if(read_option('ad3_enable', 'enable')=="1") {$ad3_enable_yes='selected="selected"';} else {$ad3_enable_no='selected="selected"';}
if(read_option('ad4_enable', 'enable')=="1") {$ad4_enable_yes='selected="selected"';} else {$ad4_enable_no='selected="selected"';}
if(read_option('ad5_enable', 'enable')=="1") {$ad5_enable_yes='selected="selected"';} else {$ad5_enable_no='selected="selected"';}


if($cat=='manage')
{
$content = $content . content_tabs($cat, "
                <div class='table'>
				<form method='get' action='index.php'>
                    <table class='listing form' cellpadding='0' cellspacing='0'>
                        <tr>
                            <th class='full' colspan='2'>ads</th>
                        </tr>

						
                        <tr>
                            <td width='172'><strong>enable ad1:</strong></td>
                            <td>
							<select name='enable1'>
							<option value='1' ".$ad1_enable_yes.">yes</option>
							<option value='0' ".$ad1_enable_no.">no</option>
							</select>
							</td>
                        </tr>
                        <tr>
                            <td width='172'><strong>ad1 content:</strong></td>
                            <td><textarea cols='40' rows='4' name='ad1_content'>".read_option('ad1_content')."</textarea></td>
                        </tr>
						
                        <tr>
                            <td width='172'><strong>enable ad2:</strong></td>
                            <td>
							<select name='enable2'>
							<option value='1' ".$ad2_enable_yes.">yes</option>
							<option value='0' ".$ad2_enable_no.">no</option>
							</select>
							</td>
                        </tr>
                        <tr>
                            <td width='172'><strong>ad2 content:</strong></td>
                            <td><textarea cols='40' rows='4' name='ad2_content'>".read_option('ad2_content')."</textarea></td>
                        </tr>

                        <tr>
                            <td width='172'><strong>enable ad3:</strong></td>
                            <td>
							<select name='enable3'>
							<option value='1' ".$ad3_enable_yes.">yes</option>
							<option value='0' ".$ad3_enable_no.">no</option>
							</select>
							</td>
                        </tr>
                        <tr>
                            <td width='172'><strong>ad3 content:</strong></td>
                            <td><textarea cols='40' rows='4' name='ad3_content'>".read_option('ad3_content')."</textarea></td>
                        </tr>

                        <tr>
                            <td width='172'><strong>enable ad4:</strong></td>
                            <td>
							<select name='enable4'>
							<option value='1' ".$ad4_enable_yes.">yes</option>
							<option value='0' ".$ad4_enable_no.">no</option>
							</select>
							</td>
                        </tr>
                        <tr>
                            <td width='172'><strong>ad4 content:</strong></td>
                            <td><textarea cols='40' rows='4' name='ad4_content'>".read_option('ad4_content')."</textarea></td>
                        </tr>

                        <tr>
                            <td width='172'><strong>enable ad5:</strong></td>
                            <td>
							<select name='enable5'>
							<option value='1' ".$ad5_enable_yes.">yes</option>
							<option value='0' ".$ad5_enable_no.">no</option>
							</select>
							</td>
                        </tr>
                        <tr>
                            <td width='172'><strong>ad5 content:</strong></td>
                            <td><textarea cols='40' rows='4' name='ad5_content'>".read_option('ad5_content')."</textarea></td>
                        </tr>						
						
						</table>
						<br>
						<input type='submit' value='save ad settings' />
						<input type='hidden' name='page' value='ads' />
						<input type='hidden' name='cat' value='manage' />
						<input type='hidden' name='save_ad_options' value='yes' />
						</form>
                </div>
			
				
");
}


?>
